/*
 * @Description: nbd developer
 * @Author: wukai
 * @CompanyWebsite: nbd.com.cn
 * @since: 2021-05-24 11:29:29
 * @LastAuthor: wukai
 * @lastTime: 2023-07-05 15:23:28
 */
import axios from '../service/axios';
import Qs from 'qs';

const IS_PROD = ['production', 'prod'].includes('prod');
const baseUrl = IS_PROD ? '' : '';
/**
 * @description: 模板查询
 * @Author: wukai
 * @since: 2021-03-24 14:17:11
 * @param {any} data
 * @return {*}
 */
export const getTpls = () => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/tpls'
        // data: data
    });
};
/**
 * @description: 获取用户信息
 * @Author: wukai
 * @since: 2022-04-06 15:50:22
 * @param {*}
 * @return {*}
 */
export const getUserInfo = () => {
    return axios({
        method: 'get',
        url: baseUrl + '/gateway/query/userInfo'
        // data: data
    });
};
/**
 * @description: 查询背景音乐
 * @Author: wukai
 * @since: 2022-03-31 15:01:27
 * @param {*}
 * @return {*}
 */
export const getBgm = () => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/bgms'
        // data: data
    });
};
/**
 * @description: 新增背景音乐
 * @Author: wukai
 * @since: 2022-03-31 15:40:26
 * @param {*}
 * @return {*}
 */
export const addmedia = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-video-edit-service/setting/save/' + data.paths,
        data: data.data
    });
};

/**
 * @description:
 * @Author: wukai
 * @since: 2022-03-31 14:15:52
 * @param {*} data
 * @return {*} data
 */
export const creatNewMsg = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-video-edit-service/video/converter/first',
        data: data
    });
};

/**
 * @description: 生成视频
 * @Author: wukai
 * @since: 2022-03-31 17:39:22
 * @param {any} data
 * @return {*}
 */
export const changeVideo = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-video-edit-service/video/gen/video',
        data: data
    });
};
/**
 * @description: 演示账号生成视频
 * @Author: wukai
 * @since: 2023-04-03 14:20:42
 * @param {any} data
 * @return {*}
 */
export const createVideoByDemonstrate = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-video-edit-service/video/demonstrate/gen/video',
        data: data
    });
};
/**
 * @description: 视频列表
 * @Author: wukai
 * @since: 2022-04-06 10:52:26
 * @param {any} data
 * @return {*}
 */
export const getVideoList = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-video-edit-service/query/videos',
        data: data
    });
};

/**
 * @description: 查询单个视频
 * @Author: wukai
 * @since: 2022-04-06 10:52:58
 * @param {any} query
 * @return {*}
 */
export const getVideobyId = (query: any) => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/videoById',
        params: query
    });
};

/**
 * @description: 复制视频
 * @Author: wukai
 * @since: 2022-04-06 11:23:34
 * @param {any} query
 * @return {*}
 */
export const copyVideo = (query: any) => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/video/copy/video',
        params: query
    });
};

/**
 * @description: 下载文件
 * @Author: wukai
 * @since: 2022-04-06 17:44:45
 * @param {*}
 * @return {*}
 */
export const downFile = (url: string) => {
    return axios({
        method: 'get',
        responseType: 'blob', //文件流将会被转成blob
        url: url
        // data: data
    });
};
/**
 * @description: 查询指定模板
 * @Author: wukai
 * @since: 2022-04-13 11:15:03
 * @param {any} query
 * @return {*}
 */
export const getTplbyId = (query: any) => {
    return axios({
        method: 'get',
        url: baseUrl + `/nbd-video-edit-service/query/tpl/${query.id}`
        // params:query
    });
};
/**
 * @description: 删除视频
 * @Author: wukai
 * @since: 2022-04-25 17:01:03
 * @param {any} query
 * @return {*}
 */
export const deletebyId = (query: any) => {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/video/delete/video/${query.id}`
        // params:query
    });
};

/**
 * @description: 获取TTS列表
 * @Author: wukai
 * @since: 2022-04-27 15:55:09
 * @param {*}
 * @return {*}
 */
export const getTts = () => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/allTts'
        // data: data
    });
};
/**
 * @description: 登录
 * @Author: wukai
 * @since: 2022-05-06 10:48:26
 * @param {any} data
 * @return {*}
 */
export const logins = (data: any) => {
    console.log(data);
    return axios({
        method: 'post',
        url: baseUrl + '/gateway/login',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
        },
        data: Qs.stringify(data)
    });
};
/**
 * @description: 登出
 * @Author: wukai
 * @since: 2022-05-16 11:24:52
 * @param undefined
 * @return {*}
 */
export const loginOut = () => {
    return axios({
        method: 'get',
        url: baseUrl + '/logout'
        //  data: data
    });
};
/**
 * @description:通过Id获取初始信息
 * @Author: wukai
 * @since: 2022-05-12 10:01:04
 * @param {*}
 * @return {*}
 */
export const getinitById = (query: any) => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/getById',
        params: query
    });
};
/**
 * @description: 心跳
 * @Author: wukai
 * @since: 2022-05-12 16:13:05
 * @param {any}
 * @return {*}
 */
export const pinbyPage = () => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/ping'
    });
};

/**
 * @description: 背景图查询
 * @Author: wukai
 * @since: 2022-05-20 09:36:57
 * @return {*}
 */
export const getbgs = () => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/bgs'
        // data: data
    });
};
/**
 * @description: 获取logo的列表
 * @Author: wukai
 * @since: 2022-05-20 09:40:20
 * @return {*}
 */
export const getLogos = () => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/logos'
        // data: data
    });
};
/**
 * @description:获取视频预置详情
 * @Author: wukai
 * @since: 2022-06-09 15:44:10
 * @return {*}
 */
export const getpreById = (query: any) => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/internal/queryPreById',
        params: query
    });
};

/**
 * @description: 线索列表
 * @Author: wukai
 * @since: 2021-03-24 14:17:11
 * @param {any} data
 * @return {*}
 */
export const getClueList = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/broad-eyes/clue/query',
        data: data
    });
};

/**
 * @description:获取menu
 * @Author: wukai
 * @since: 2023-03-03 17:16:33
 * @return {*}
 */
export const getMenuList = () => {
    return axios({
        method: 'get',
        url: baseUrl + `/broad-eyes/menu/find?companyId=${sessionStorage.getItem('comId')}`
    });
};
/**
 * @description: 选题列表
 * @Author: wukai
 * @since: 2022-07-27 16:00:30
 * @param {any} data
 * @return {*}
 */
export const getTopicList = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/broad-eyes/topic/page?companyId=' + sessionStorage.getItem('comId'),
        data: data
    });
};
/**
 * @description: 根据选题id查询线索
 * @Author: wukai
 * @since: 2022-07-27 16:26:03
 * @param {any} data
 * @return {*}
 */
export const getTopicbyClueList = (id: any) => {
    return axios({
        method: 'get',
        url: baseUrl + `/broad-eyes/topic/find/clue/${id}?companyId=` + sessionStorage.getItem('comId')
        // data: data
    });
};
/**
 * @description: 根据id删除线索
 * @Author: wukai
 * @since: 2022-03-31 15:01:27
 * @param {*}
 * @return {*}
 */
export const deleteTopById = (query: any) => {
    return axios({
        method: 'get',
        url: baseUrl + `/broad-eyes/clue/delete`,
        params: query
    });
};
/**
 * @description: 根据ID查询选题
 * @Author: wukai
 * @since: 2022-04-06 10:52:58
 * @param {any} query
 * @return {*}
 */
export const geTopicbyId = (id: any) => {
    return axios({
        method: 'get',
        url: baseUrl + `/broad-eyes/topic/find/${id}`
        // params:query
    });
};

/**
 * @description: 修改选题
 * @Author: wukai
 * @since: 2022-04-06 11:23:34
 * @param {any} query
 * @return {*}
 */
export const updateTopic = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/broad-eyes/topic/update',
        data: data
    });
};
/**
 * @description: 根据选题生成视频
 * @Author: wukai
 * @since: 2022-04-13 11:15:03
 * @param {any} query
 * @return {*}
 */
export const createVideoById = (id: any) => {
    return axios({
        method: 'get',
        url: baseUrl + `/broad-eyes/topic/video/${id}`
        // params:query
    });
};

/**
 * @description: 收藏线索
 * @Author: wukai
 * @since: 2023-03-06 10:16:59
 * @param {any} query
 * @return {*}
 */
export const topicCollect = (query: any) => {
    return axios({
        method: 'get',
        url: baseUrl + `/broad-eyes/clue/collect`,
        params: query
    });
};

/**
 * @description: 查询每经的关键字词云
 * @Author: wukai
 * @since: 2023-03-06 15:19:25
 * @param {any} query
 * @return {*}
 */
export const getKeywordList = (query: any) => {
    return axios({
        method: 'get',
        url: baseUrl + `/broad-eyes/keyword/find/mj`,
        params: query
    });
};
/**
 * @description: 添加关键字
 * @Author: wukai
 * @since: 2023-03-06 15:51:35
 * @param {any} data
 * @return {*}
 */
export const addKeyword = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/broad-eyes/keyword/add',
        data: data
    });
};

/**
 * @description: 修改每经关键字
 * @Author: wukai
 * @since: 2023-03-06 16:06:28
 * @param {any} data
 * @return {*}
 */
export const updataKeyword = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/broad-eyes/keyword/update/mj',
        data: data
    });
};
/**
 * @description: 修改菜单
 * @Author: wukai
 * @since: 2023-03-10 14:59:45
 * @param {any} data
 * @return {*}
 */
export const updataMenu = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/broad-eyes/menu/save',
        data: data
    });
};
/**
 * @description: 选择媒资库
 * @Author: wukai
 * @since: 2022-06-30 17:31:55
 * @param {any} data
 * @return {*}
 */
export const getComposeCnt = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-media-resource/query/search/input',
        data: data
    });
};
/**
 * @description: 选择媒资库2
 * @Author: dyl
 * @since: 2022-10-26 14:31:55
 * @param {any} data
 * @return {*}
 */
export const getComposeCntII = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-media-resource/query/search/xdInput',
        data: data
    });
};

/**
 * @description: 视频星斗查询
 * @Author: wukai
 * @since: 2022-07-04 09:37:26
 * @return {*}
 */
export const getSearchByStar = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-video-edit-service/query/star/videos',
        data: data
    });
};
/**
 * @description: 主账号查询视频列表
 * @Author: wukai
 * @since: 2023-01-03 10:07:59
 * @param {any} data
 * @return {*}
 */
export const getSearchByAdmin = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-video-edit-service/comp/admin/videos',
        data: data
    });
};
/**
 * @description: 获取子账号名称
 * @Author: wukai
 * @since: 2023-01-03 10:08:56
 * @param {any} none
 * @return {*}
 */
export const getchildSelectList = (paths: string) => {
    return axios({
        method: 'get',
        url: baseUrl + paths
        // data: data,
    });
};
/**
 * @description: 收藏
 * @Author: wukai
 * @since: 2022-07-05 14:29:27
 * @param {any} data
 * @return {*}
 */
export const collectById = (id: any) => {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/video/collect/video/${id}`
        //  data: data
    });
};

/**
 * @description: 取消收藏
 * @Author: wukai
 * @since: 2022-07-05 16:49:12
 * @param {any} id
 * @return {*}
 */
export const uncollectById = (id: any) => {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/video/unCollect/video/${id}`
        //  data: data
    });
};

/**
 * @description: 查询标签
 * @Author: wukai
 * @since: 2022-07-05 16:52:00
 * @param {any} id
 * @return {*}
 */
export const tagsList = () => {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/query/video/tags`
    });
};
/**
 * @description: 删除背景图
 * @Author: wukai
 * @since: 2022-08-02 11:00:52
 * @return {*}
 */
export const deleteBg = (id: any) => {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/setting/delete/bg/${id}`
    });
};
/**
 * @description: 删除logo
 * @Author: wukai
 * @since: 2022-08-02 11:01:56
 * @param {any} id
 * @return {*}
 */
export const deleteLogo = (id: any) => {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/setting/delete/logo/${id}`
    });
};
// 修改线索
export const updateClue = (data: any) => {
    return axios({
        method: 'post',
        url: baseUrl + '/broad-eyes/clue/update',
        data
    });
};
// 分组根据类别查询(管理页)
export const getManagerCategoryTypes = (params: any) => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/manage/categoryTypes',
        params
    });
};
// 分组根据类别查询(列表页)
export const getCategoryTypesList = (params: any) => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/manage/categoryTypes',
        params
    });
};
// 新增分组
export const addResourceCategory = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/save/resourceCategory',
        data
    });
};
// 排序管理
export const categoryOrder = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/set/categoryOrder',
        data
    });
};
// 编辑分组
export const resourceCategory = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/update/resourceCategory',
        data
    });
};
// 背景音列表
export const getBgmsByPage = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/query/getBgmsByPage',
        data
    });
};
// 新增背景音
export const settingSaveBgm = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/save/bgm',
        data
    });
};
// 背景音根据分组分页查询(内容管理)
export const getBgmsByPageType = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/query/getBgmsByPageType',
        data
    });
};
// 删除背景音
export const deleteBgm = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/delete/bgm',
        data
    });
};
// 更新背景音
export const updateBgm = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/update/bgm',
        data
    });
};
// 背景音内容管理
export const groupManageBgm = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/groupManage/bgm',
        data
    });
};
// TTS列表
export const getTTSList = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/query/allTtsByPage',
        data
    });
};
// TTS根据分组分页查询(内容管理)
export const getTTSByPageType = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/query/allTtsByPageType',
        data
    });
};
// TTS内容管理
export const groupManageTTS = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/groupManage/tts',
        data
    });
};
// tts根据分组查询(下拉查询)
export const allTtsByType = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/query/allTtsByType',
        data
    });
};
// 背景音根据分组查询(下拉查询)
export const allBgmsByType = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/query/getBgmsByType',
        data
    });
};
// 上传excel
export const uploadTTS = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/upload/tts',
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        data
    });
};
// 新增TTS
export const saveSingleTTS = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/saveSingle/tts',
        data
    });
};
// 更新TTS
export const updateSingleleTTS = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/updateSingle/tts',
        data
    });
};
// 试听TTS
export const auditionTtsTTS = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/auditionTts',
        data
    });
};
// 删除TTS
export const deleteTTS = (id: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/delete/tts/' + id
    });
};
// 批量制作视频
export const cluesToVideo = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/autoVideo/batch/clue/video',
        data
    });
};
// 删除分组
export const deleteCategory = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/setting/delete/category/' + data
    });
};
/**
 * @description: 查询蚁小二所有账号
 * @return {*}
 */
export const searchAccount = (data: any) => {
    return axios({
        method: 'get',
        url: baseUrl + '/publish/yxe/account/find_company',
        params: data
    });
};
/**
 * @description: 账号登录检测
 * @return {*}
 */
export function checkAccount(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/account/check_status`,
        method: 'post',
        data: data
    });
}

/**
 * @description: 蚁小二登录
 * @param {*} data
 * @return {*}
 */
export function getLoginData(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/account/login`,
        method: 'get',
        params: data
    });
}

/**
 * @description: 保存登录数据
 * @param {*} data
 * @return {*}
 */
export function saveLoginData(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/account`,
        method: 'post',
        data: data
    });
}

/**
 * @description: 账号状态发布
 * @param {*} data
 * @return {*}
 */
export function generateInfo(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/publish/publish`,
        method: 'post',
        data: data
    });
}
/**
 * @description: 账号状态更新
 * @return {*}
 */
export function updateAccount(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/account/update_status`,
        method: 'post',
        data: data
        // loading:true,
    });
}

/**
 * @description: 发布后结果
 * @param {*} data
 * @return {*}
 */
export function publishResult(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/publish/publish_resp`,
        method: 'post',
        data: data
    });
}

/**
 * @description: 空闲获取更新状态数据
 * @param {*} data
 * @return {*}
 */
export function getUpdateData(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/publish/check_status`,
        method: 'get',
        params: data
    });
}

/**
 * @description: 分页查询所有
 * @return {*}
 */
export function getRecordList(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/publish/find_page`,
        method: 'get',
        params: data
    });
}

/**
 * @description:  获取平台活动
 * @return {*}
 */

export function getActivities(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/publish/activity`,
        method: 'get',
        params: data
    });
}

/**
 * @description:  获取平台分类
 * @return {*}
 */

export function getCategories(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/publish/category`,
        method: 'get',
        params: data
    });
}

/**
 * @description: 删除平台账号
 * @return {*}
 */
export function deleteAccount(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/account/delete`,
        method: 'get',
        params: data
    });
}

/**
 * @description: 抖音 话题/热点
 * @return {*}
 */

export function publishOtherInfo(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/account/other_info`,
        method: 'post',
        data: data
    });
}

/**
 * @description: 抖音获取地址
 * @return {*}
 */
export function getDyAdd(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/publish/location`,
        method: 'get',
        params: data
    });
}

/**
 * @description: 视频发布记录
 * @return {*}
 */
export function videoPublishRecord(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/publish/find/history`,
        method: 'get',
        params: data
    });
}

/**
 * @description: 更新发布状态
 * @return {*}
 */
export function updatePublishStatus(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/publish/check_status`,
        method: 'get',
        params: data
    });
}

/**
 * @description: 发布状态修改
 * @return {*}
 */

export function publishModify(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/publish/update_status`,
        method: 'post',
        data: data
    });
}

/**
 * @description: 发布状态轮询
 * @return {*}
 */
export function updatePublishStatusAuto(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/publish/auto_status`,
        method: 'get',
        params: data
    });
}

/**
 * @description: 虚拟人视频列表
 * @Author: wukai
 * @since: 2022-11-17 14:13:55
 * @param {any} data
 * @return {*}
 */
export function getAvatarVideos(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-video-edit-service/query/star/avatarVideos',
        data: data
    });
}
/**
 * @description: 虚拟人查询
 * @Author: wukai
 * @since: 2022-11-17 14:20:38
 * @return {*}
 */
export function getAvatarList() {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/avatarList'
    });
}
/**
 * @description: 虚拟人背景
 * @Author: wukai
 * @since: 2022-11-17 15:22:05
 * @return {*}
 */
export function getAvatarBgs() {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/getAvatarBgs'
    });
}
/**
 * @description: 生成虚拟人视频
 * @Author: wukai
 * @since: 2022-11-17 14:21:31
 * @param {any} data
 * @return {*}
 */
export function cearteAvatarVideo(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-video-edit-service/video/gen/avatarVideo',
        data: data
    });
}
/**
 * @description: 新增背景图
 * @Author: wukai
 * @since: 2022-11-17 15:39:16
 * @param {any} data
 * @return {*}
 */
export function addAvatarBg(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + '/nbd-video-edit-service/setting/save/avatarBg',
        data: data
    });
}
/**
 * @description: 删除背景图
 * @Author: wukai
 * @since: 2022-11-17 16:01:22
 * @param {any} data
 * @return {*}
 */
export function deleteAvatarBg(id: any) {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/setting/delete/avatarBg/${id}`
    });
}
/**
 * @description: 删除虚拟人视频
 * @Author: wukai
 * @since: 2022-11-17 17:21:00
 * @param {any} id
 * @return {*}
 */
export function deleteAvatarVideo(id: any) {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/video/delete/avatarVideo/${id}`
    });
}

/**
 * @description: 查询单个视频
 * @Author: wukai
 * @since: 2022-11-17 17:32:18
 * @return {*}
 */
export function getAvatarById(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/avatarVideoById',
        params: query
    });
}
/**
 * @description: 修改模板名字
 * @Author: wukai
 * @since: 2022-11-29 17:18:08
 * @param {any} data
 * @return {*}
 */
export function setTplName(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/setting/modify/tplName`,
        data: data
    });
}

// 上传课件
export const uploadPPtAxios = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/courseware/uploadPPt',
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        data
    });
};
// 课程虚拟人查询
export const courseAvatarList = () => {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/courseAvatarList'
    });
};
// 课件生成视频
export const genVideoByCourse = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/courseware/genVideoByCourse',
        data
    });
};
// 生成课件列表
export const genCourseList = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + '/nbd-video-edit-service/courseware/list',
        data
    });
};
// 获取生成记录/courseware/video/records/{id}
export const genCourseVideoRecords = (id: string) => {
    return axios({
        method: 'GET',
        url: baseUrl + `/nbd-video-edit-service/courseware/video/records/${id}`
    });
};
// 根据id查询课件data
export const genCourseVideoData = (id: string) => {
    return axios({
        method: 'GET',
        url: baseUrl + `/nbd-video-edit-service/courseware/video/${id}`
    });
};
// 课件背景列表
export const getCourseBgs = () => {
    return axios({
        method: 'GET',
        url: baseUrl + `/nbd-video-edit-service/courseware/query/getCourseBgs`
    });
};
// 上传课件
export const saveCourseBgs = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + `/nbd-video-edit-service/setting/save/courseBg`,
        data
    });
};
// 删除课件背景图
export const deleteCourseBg = (id: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + `/nbd-video-edit-service/setting/delete/courseBg/${id}`
    });
};
// 查询转场
export const getCoursewareTrans = () => {
    return axios({
        method: 'GET',
        url: baseUrl + `/nbd-video-edit-service/courseware/query/trans`
    });
};
// 查询风格
export const getCoursewareStyles = () => {
    return axios({
        method: 'GET',
        url: baseUrl + `/nbd-video-edit-service/courseware/query/styles`
    });
};
// 课件试听
export const auditionTts = (data: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + `/nbd-video-edit-service/courseware/auditionTts`,
        data
    });
};
// 收藏课件
export const collectPPT = (id: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + `/nbd-video-edit-service/courseware/collect/${id}`
    });
};
// 取消收藏
export const cancelcollectPPT = (id: any) => {
    return axios({
        method: 'POST',
        url: baseUrl + `/nbd-video-edit-service/courseware/unCollect/${id}`
    });
};
// 删除课件
export const deleteCourse = (id: any) => {
    return axios({
        method: 'GET',
        url: baseUrl + `/nbd-video-edit-service/courseware/deleteCourse/${id}`
    });
};
/**
 * @description: 短视频虚拟人查询
 * @Author: wukai
 * @since: 2022-11-17 14:20:38
 * @return {*}
 */
export function getSimpleAvatarList() {
    return axios({
        method: 'get',
        url: baseUrl + '/nbd-video-edit-service/query/SimpleAvatarList'
    });
}

// 数据看板api
/**
 * @description: 数据总览
 * @Author: wukai
 * @since: 2023-03-28 09:37:02
 * @param {string} timeInternal
 * @return {*}
 */
export function getOverviews(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + `/hxkj-swift-data-support/support/data/overviews`,
        params: query
    });
}
export function getOverviews1(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + `/publish/yxe/statistic/find/read_total`,
        params: query
    });
}
/**
 * @description: 用户统计
 * @Author: wukai
 * @since: 2023-03-28 09:37:50
 * @param {any} data
 * @return {*}
 */
export function getUsers(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + '/hxkj-swift-data-support/admin/manager/users',
        data
    });
}
/**
 * @description: 量产统计
 * @Author: wukai
 * @since: 2023-03-28 14:25:48
 * @param {any} query
 * @return {*}
 */
export function getProduce(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + '/hxkj-swift-data-support/support/data/compdetail',
        data
    });
}
/**
 * @description: 产量排名
 * @Author: wukai
 * @since: 2023-04-13 10:15:42
 * @param {any} query
 * @return {*}
 */
export function getProrank(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/hxkj-swift-data-support/support/data/prorank',
        params: query
    });
}
/**
 * @description: 时长排名
 * @Author: wukai
 * @since: 2023-04-13 10:20:26
 * @param {any} query
 * @return {*}
 */
export function getTImerank(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/hxkj-swift-data-support/support/data/timerank',
        params: query
    });
}
/**
 * @description: 传播统计
 * @Author: wukai
 * @since: 2023-03-29 11:21:19
 * @param {any} data
 * @return {*}
 */
export function getSpread(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/publish/yxe/statistic/find/total',
        params: query
    });
}
/**
 * @description: 分发流量Top
 * @Author: wukai
 * @since: 2023-04-13 11:12:04
 * @param {any} query
 * @return {*}
 */
export function getFindTop(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/publish/yxe/statistic/find/top',
        params: query
    });
}
/**
 * @description: 获取状态
 * @Author: wukai
 * @since: 2023-03-29 14:53:29
 * @param {any} data
 * @return {*}
 */
export function getStaticSync() {
    return axios({
        url: baseUrl + `/publish/yxe/statistic/static_sync`,
        method: 'get'
    });
}
export function getUpdataStatic(data: any) {
    return axios({
        url: baseUrl + `/publish/yxe/statistic/static_result`,
        method: 'post',
        data
    });
}
/**
 * @description: 公司数据详情
 * @Author: wukai
 * @since: 2023-03-30 10:31:14
 * @param {any} data
 * @return {*}
 */
export function getCompname(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/hxkj-swift-data-support/support/data/compname',
        params: query
    });
}
/**
 * @description: 高频媒资词top20
 * @Author: wukai
 * @since: 2023-04-13 11:52:22
 * @param {any} query
 * @return {*}
 */
export function getMzTop20(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/hxkj-swift-data-support/support/data/mzstore',
        params: query
    });
}
export function getMzList(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/hxkj-swift-data-support/support/data/mzmore',
        params: query
    });
}
/**
 * @description: 空缺媒资词云
 * @Author: wukai
 * @since: 2023-04-13 14:30:42
 * @param {any} query
 * @return {*}
 */
export function getMzDeflutwords(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/hxkj-swift-data-support/support/data/deflutwords',
        params: query
    });
}
/**
 * @description: 高频词云
 * @Author: wukai
 * @since: 2023-04-13 14:38:00
 * @param {any} query
 * @return {*}
 */
export function getMzTxtwords(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/hxkj-swift-data-support/support/data/txtwords',
        params: query
    });
}
export function getMoreList(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + `/hxkj-swift-data-support/support/data/${query.paths}`,
        params: query.data
    });
}
/**
 * @description:获取用户主体信息
 * @Author: wukai
 * @since: 2023-04-10 11:17:20
 * @return {*}
 */
export function getStatistics() {
    return axios({
        method: 'get',
        url: baseUrl + '/hxkj-swift-user-service/admin/user/manage/query/comp/statistics'
    });
}

/**
 * @description: 获取公司基础信息
 * @Author: wukai
 * @since: 2023-04-10 11:26:48
 * @param {string} id
 * @return {*}
 */
export function getUsersById(paths: string) {
    return axios({
        method: 'get',
        url: baseUrl + paths
    });
}
/**
 * @description: 公司监控词云
 * @Author: wukai
 * @since: 2023-04-13 15:58:45
 * @param {any} query
 * @return {*}
 */
export function getCompwords(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/hxkj-swift-data-support/support/data/compwords',
        params: query
    });
}
/**
 * @description: 数据看板公司用户列表
 * @Author: wukai
 * @since: 2023-04-13 16:18:28
 * @param {any} data
 * @return {*}
 */
export function getCompUserList(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + '/hxkj-swift-data-support/support/data/userlist',
        data
    });
}
/**
 * @description: 媒资数量统计
 * @Author: wukai
 * @since: 2023-04-13 17:13:10
 * @param {any} query
 * @return {*}
 */
export function getMzcount(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/hxkj-swift-data-support/support/data/mzcount',
        params: query
    });
}
/**
 * @description: 用户基本信息
 * @Author: wukai
 * @since: 2023-04-13 17:20:11
 * @param {any} query
 * @return {*}
 */
export function getUserBaseById(query: any) {
    return axios({
        method: 'get',
        url: baseUrl + '/hxkj-swift-data-support/support/data/username',
        params: query
    });
}
/**
 * @description: 获取虚拟人所有配置
 * @Author: wukai
 * @since: 2023-04-18 17:35:22
 * @return {*}
 */
export function getAvatarSettingList(type: string) {
    return axios({
        method: 'get',
        url: baseUrl + `/nbd-video-edit-service/query/commonAvatarTree/${type}`
    });
}
/**
 * @description: 获取智慧课件虚拟人所有配置
 * @Author: wukai
 * @since: 2023-04-23 11:08:38
 * @param {string} type
 * @return {*}
 */
export function getAvatarkjList(type: string) {
    return axios({
        method: 'get',
        url: baseUrl + `/nbd-video-edit-service/courseware/commonAvatarTree/${type}`
    });
}
/**
 * @description: 获取短视频编辑虚拟人列表
 * @Author: wukai
 * @since: 2023-04-24 17:35:28
 * @param {string} type
 * @return {*}
 */
export function getAvatarEditList(type: string, tplId: string) {
    return axios({
        method: 'get',
        url: baseUrl + `/nbd-video-edit-service/query/commonAvatarTreeFilter/${type}/${tplId}`
    });
}
/**
 * @description: 标题改写
 * @Author: wukai
 * @since: 2023-04-28 09:48:01
 * @param {any} data
 * @return {*}
 */
export function changModifyTitle(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-ai-service/video/modifyTitle`,
        data
    });
}
/**
 * @description: 正文改写
 * @Author: wukai
 * @since: 2023-04-28 10:26:46
 * @param {any} data
 * @return {*}
 */
export function changModifyText(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-ai-service/video/modifyText`,
        data
    });
}

/**
 * @description: Ai创作
 * @Author: wukai
 * @since: 2023-04-28 10:54:32
 * @param {any} data
 * @return {*}
 */
export function aiGenText(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-ai-service/video/genText`,
        data
    });
}
/**
 * @description: 长摘要
 * @Author: wukai
 * @since: 2023-05-17 09:37:41
 * @param {any} data
 * @return {*}
 */
export function aiLongTextSum(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-ai-service/broadEyes/longTextSum`,
        data
    });
}
/**
 * @description: 历史记录
 * @Author: wukai
 * @since: 2023-04-28 15:12:27
 * @return {*}
 */
export function getGenRecord() {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-ai-service/video/getGenRecords`
    });
}

/**
 * @description: 获取蚁小二演示账号发布信息
 * @Author: wukai
 * @since: 2023-05-08 10:47:29
 * @param {string} id
 * @return {*}
 */
export function getyxeYanshi(id: string) {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/video/demonstrate/pub/video/${id}`
    });
}

/**
 * @description: 获取路由
 * @Author: wukai
 * @since: 2023-05-10 17:30:17
 * @return {*}
 */
export function getmenuList() {
    return axios({
        method: 'get',
        url: baseUrl + `/hxkj-swift-user-service/normal/query/menu/STARS`
    });
}
/**
 * @description: 手动轮询获取演示视频的状态
 * @Author: wukai
 * @since: 2023-05-23 09:44:28
 * @param {string} id
 * @return {*}
 */
export function getVideoStep(id: string) {
    return axios({
        method: 'get',
        url: baseUrl + `/nbd-video-edit-service/video/demonstrate/query/video/${id}`
    });
}

/**
 * @description: 获取个人信息
 * @Author: wukai
 * @since: 2023-06-02 11:10:11
 * @return {*}
 */
export function getRemindTime() {
    return axios({
        method: 'get',
        url: baseUrl + `/hxkj-swift-data-support/query/data/remindTime`
    });
}
/**
 * @description: 获取个人信息
 * @Author: wukai
 * @since: 2023-06-02 11:21:23
 * @return {*}
 */
export function getpasswdMsg() {
    return axios({
        method: 'get',
        url: baseUrl + `/hxkj-swift-user-service/normal/query/pwd`
    });
}

export function updataPwd(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + `/hxkj-swift-user-service/compManager/user/manage/update/pwd`,
        data
    });
}

export function updataUseInfo(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + `/hxkj-swift-user-service/compManager/user/manage/update/userInfo`,
        data
    });
}
/**
 * @description:保存草稿
 * @Author: wukai
 * @since: 2023-06-05 10:05:42
 * @param {any} data
 * @return {*}
 */
export function updataDraft(data: any) {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/video/save/draft`,
        data
    });
}
/**
 * @description: 删除草稿
 * @Author: wukai
 * @since: 2023-06-05 10:07:36
 * @param {any} id
 * @return {*}
 */
export function delDraft(id: any) {
    return axios({
        method: 'post',
        url: baseUrl + `/nbd-video-edit-service/video/delete/draft/${id}`
    });
}
/**
 * @description:草稿列表
 * @Author: wukai
 * @since: 2023-06-05 10:25:11
 * @param {any} data
 * @return {*}
 */
export function getDraftList(data: any) {
    return axios({
        method: 'get',
        url: baseUrl + `/nbd-video-edit-service/query/draftList/${data.curr}/${data.pageSize}`
    });
}
/**
 * @description: 根据ID查询草稿
 * @Author: wukai
 * @since: 2023-06-05 11:01:35
 * @param {any} id
 * @return {*}
 */
export function getDraftById(data: any) {
    return axios({
        method: 'get',
        url: baseUrl + `/nbd-video-edit-service/query/draftById/${data.id}`
    });
}
/**
 * @description: 获取通知
 * @Author: wukai
 * @since: 2023-06-06 15:44:03
 * @return {*}
 */
export function getnoticeInfo() {
    return axios({
        method: 'get',
        url: baseUrl + `/hxkj-swift-user-service/normal/query/noticeInfo `
    });
}
/**
 * @description: 查询本场成品
 * @Author: wukai
 * @since: 2023-05-22 15:04:25
 * @param {any} query
 * @return {*}
 */
export function searchpClipList(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/edit/video`,
        params: query
    });
}
/**
 * @description: 查询本场片段
 * @Author: wukai
 * @since: 2023-05-22 15:08:00
 * @param {any} query
 * @return {*}
 */
export function getEditLiveList(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/edit_live`,
        params: query
    });
}
/**
 * @description: 删除剪辑
 * @Author: wukai
 * @since: 2023-06-27 11:10:51
 * @param {any} query
 * @return {*}
 */
export function deleteLiveEdit(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/delete_edit`,
        params: query
    });
}
/**
 * @description: 查询截图
 * @Author: wukai
 * @since: 2023-05-22 15:06:35
 * @param {any} query
 * @return {*}
 */
export function searchSnapshotList(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/snapshot`,
        params: query
    });
}
/**
 * @description: 直接剪辑固化
 * @Author: wukai
 * @since: 2023-05-22 15:11:03
 * @param {any} query
 * @return {*}
 */
export function persistenceHandle(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/persistence`,
        params: query
    });
}
export function persistenceHandle1(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/clip`,
        params: query
    });
}
/**
 * @description: 直播管理列表
 * @Author: wukai
 * @since: 2023-05-10 10:04:56
 * @param {any} query
 * @return {*}
 */
export function getLiveList(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/condition`,
        params: query
    });
}

/**
 * @description: 创建直播
 * @Author: wukai
 * @since: 2023-05-22 14:59:26
 * @param {any} data
 * @return {*}
 */
export function createLive(data: any) {
    return axios({
        method: 'post',
        url: `/live/live/create`,
        data
    });
}
/**
 * @description: 修改直播
 * @Author: wukai
 * @since: 2023-06-14 10:24:30
 * @param {any} data
 * @return {*}
 */
export function updataLive(data: any) {
    return axios({
        method: 'post',
        url: `/live/live/update`,
        data
    });
}
/**
 * @description: 删除指定直播
 * @Author: wukai
 * @since: 2023-06-14 11:04:42
 * @param {any} query
 * @return {*}
 */
export function deleteLive(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/delete_live`,
        params: query
    });
}
/**
 * @description: 查询关键帧
 * @Author: wukai
 * @since: 2023-06-15 09:43:05
 * @param {any} query
 * @return {*}
 */
export function getFrameList(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/find_key_frame`,
        params: query
    });
}
/**
 * @description: 添加关键帧
 * @Author: wukai
 * @since: 2023-05-10 14:31:43
 * @param {any} query
 * @return {*}
 */
export function addKkeyFrame(data: any) {
    return axios({
        method: 'post',
        url: `/live/live/add_key_frame`,
        data
    });
}
/**
 * @description: 移除关键帧
 * @Author: wukai
 * @since: 2023-06-19 10:04:51
 * @param {any} query
 * @return {*}
 */
export function deletekeyFrame(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/delete_key_frame`,
        params: query
    });
}
/**
 * @description: 查询语音转文字
 * @Author: wukai
 * @since: 2023-06-19 11:44:15
 * @param {any} query
 * @return {*}
 */
export function getWordList(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/find_transfer`,
        params: query
    });
}
/**
 * @description: 直播详情
 * @Author: wukai
 * @since: 2023-06-26 10:35:00
 * @param {any} query
 * @return {*}
 */
export function getLiveDetail(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/detail`,
        params: query
    });
}

export function getIndex(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/get_index`,
        params: query
    });
}
/**
 * @description:修改role
 * @Author: wukai
 * @since: 2023-06-29 16:59:12
 * @param {any} data
 * @return {*}
 */
export function changeRole(data: any) {
    return axios({
        method: 'post',
        url: `/live/live/update_role`,
        data
    });
}
/**
 * @description: 查询所有角色
 * @Author: wukai
 * @since: 2023-06-30 09:36:41
 * @param {any} query
 * @return {*}
 */
export function findAllRole(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/find_role`,
        params: query
    });
}
/**
 * @description: 修改剪辑名称
 * @Author: wukai
 * @since: 2023-06-30 11:43:02
 * @param {any} query
 * @return {*}
 */
export function changeEditName(query: any) {
    return axios({
        method: 'get',
        url: `/live/live/update_edit_name`,
        params: query
    });
}
/**
 * @description:修改文字
 * @Author: wukai
 * @since: 2023-07-03 16:32:35
 * @param {any} data
 * @return {*}
 */
export function updataTransfer(data: any) {
    return axios({
        method: 'post',
        url: `/live/live/update_transfer`,
        data
    });
}
/**
 * @description: 获取上传临时凭证
 * @Author: wukai
 * @since: 2023-07-05 15:23:45
 * @param {any} data
 * @return {*}
 */
export function getPutObject() {
    return axios({
        method: 'get',
        url: `/live/oss/get_put_object`
    });
}
